Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@opencensus/core
Advanced tools
OpenCensus is a toolkit for collecting application performance and behavior data.
The @opencensus/core package is a set of libraries for collecting, processing, and exporting telemetry data (metrics and traces) for analysis to improve the performance and reliability of applications. It is part of the OpenCensus project, which aims to provide a single, high-quality telemetry collection framework across multiple languages.
Tracing
This feature allows the collection and export of trace data, which helps in understanding the flow of requests through various services and in identifying bottlenecks and latency issues.
const { Tracing } = require('@opencensus/core');
const tracing = Tracing.instance;
// Configure tracing
tracing.start({samplingRate: 1});
// Create a custom span
const rootSpan = tracing.tracer.startRootSpan({name: 'main'}, rootSpan => {
// Do work within the span
rootSpan.end(); // End the span
});
Metrics
This feature enables the collection and aggregation of metrics data, such as counts or latencies, which can be used for monitoring application performance and health.
const { Metrics, MeasureUnit } = require('@opencensus/core');
const metrics = Metrics.instance;
// Create a measure
const requestCountMeasure = metrics.createMeasureInt64('request_count', MeasureUnit.UNIT, 'Count of requests received');
// Create and register a view to aggregate the data
metrics.createView('request_count_view', requestCountMeasure, 'count', [], 'The count of requests', []);
// Record data
metrics.record([{measure: requestCountMeasure, value: 1}]);
The prom-client package is specifically designed for creating metrics in the Prometheus format. It focuses solely on metrics collection and exposition, unlike @opencensus/core, which supports both tracing and metrics. This makes prom-client a good choice if you are specifically looking for Prometheus support, but it lacks the tracing capabilities of @opencensus/core.
OpenCensus for Node.js is an implementation of OpenCensus, a toolkit for collecting application performance and behavior monitoring data.
The library is in alpha stage and the API is subject to change.
Please join gitter for help or feedback on this project.
0.0.4 - 2018-08-29
FAQs
OpenCensus is a toolkit for collecting application performance and behavior data.
The npm package @opencensus/core receives a total of 1,037,025 weekly downloads. As such, @opencensus/core popularity was classified as popular.
We found that @opencensus/core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.